#DESTDIR = ~/share/tftpdir/jyy/

APP_TEST = vga

OBJS_TEST = main.o video.o

ARCH ?= arm-linux-

CFLAG =
LDFLAG =

CC = $(ARCH)g++

all: $(APP_TEST)
ifneq ($(DESTDIR),)
	@cp -raf $^ $(DESTDIR)	
endif

$(APP_TEST): $(OBJS_TEST)
	$(CC) -Wall $(CFLAG) -o $@ $^ $(LDFLAG)
	
%.o: %.cpp
	$(CC) -Wall $(CFLAG) -c -o $@ $<

%.o: %.c
	$(CC) -Wall $(CFLAG) -c -o $@ $<

clean:
	rm -rf $(APP_TEST) *.o *.i
